package com.gemfire.onlineretailer.domain;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import com.gemstone.gemfire.DataSerializable;

public class Address implements DataSerializable {
	  private static final long serialVersionUID = 1L;
	  
	  private long addressId;
	  private String houseNumber;
	  private String streetName;
	  private String usState;
	  private String country;
	  private String zipCode;
	  
	
	  public Address(){
		  
	  }
	  
	public long getAddressId() {
		return addressId;
	}
	public void setAddressId(long addressId) {
		this.addressId = addressId;
	}
	public String getHouseNumber() {
		return houseNumber;
	}
	public void setHouseNumber(String houseNumber) {
		this.houseNumber = houseNumber;
	}
	public String getStreetName() {
		return streetName;
	}
	public void setStreetName(String streetName) {
		this.streetName = streetName;
	}
	public String getUsState() {
		return usState;
	}
	public void setUsState(String usState) {
		this.usState = usState;
	}
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	public String getZipCode() {
		return zipCode;
	}
	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	@Override
	public void fromData(DataInput in) throws IOException,
			ClassNotFoundException {
		this.addressId = in.readLong();
		this.houseNumber = in.readUTF();
		this.streetName = in.readUTF();
		this.usState = in.readUTF();
		this.zipCode = in.readUTF();
		this.country = in.readUTF();
		
	}
	@Override
	public void toData(DataOutput out) throws IOException {
		 out.writeLong(this.addressId);
		 out.writeUTF(this.houseNumber);
		 out.writeUTF(this.streetName);
		 out.writeUTF(this.usState);
		 out.writeUTF(this.zipCode);
		 out.writeUTF(this.country);
	}

}
